/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ronsicecream.pos.entities;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author user
 */
@Entity
@Table(name = "pos_transaction_mk_distribution_to_outlet_detail")
@XmlRootElement
//@NamedQueries({
//    @NamedQuery(name = "PosTransactionMkDistributionToOutletDetail.findAll", query = "SELECT p FROM PosTransactionMkDistributionToOutletDetail p"),
//    @NamedQuery(name = "PosTransactionMkDistributionToOutletDetail.findBySync", query = "SELECT p FROM PosTransactionMkDistributionToOutletDetail p WHERE p.sync = :sync"),
//    @NamedQuery(name = "PosTransactionMkDistributionToOutletDetail.findByDistributionDetailId", query = "SELECT p FROM PosTransactionMkDistributionToOutletDetail p WHERE p.distributionDetailId = :distributionDetailId"),
//    @NamedQuery(name = "PosTransactionMkDistributionToOutletDetail.findByDistributionDetailQuantity", query = "SELECT p FROM PosTransactionMkDistributionToOutletDetail p WHERE p.distributionDetailQuantity = :distributionDetailQuantity"),
//    @NamedQuery(name = "PosTransactionMkDistributionToOutletDetail.findByDistributionDetailSent", query = "SELECT p FROM PosTransactionMkDistributionToOutletDetail p WHERE p.distributionDetailSent = :distributionDetailSent"),
//    @NamedQuery(name = "PosTransactionMkDistributionToOutletDetail.findByDistributionDetailUnsent", query = "SELECT p FROM PosTransactionMkDistributionToOutletDetail p WHERE p.distributionDetailUnsent = :distributionDetailUnsent"),
//    @NamedQuery(name = "PosTransactionMkDistributionToOutletDetail.findByDistributionDetailPrice", query = "SELECT p FROM PosTransactionMkDistributionToOutletDetail p WHERE p.distributionDetailPrice = :distributionDetailPrice")})
public class PosTransactionMkDistributionToOutletDetail implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "sync")
    private String sync;
    @Id
    @Basic(optional = false)
    @Column(name = "distribution_detail_id")
    private Integer distributionDetailId;
    @Column(name = "distribution_detail_quantity")
    private BigDecimal distributionDetailQuantity;
    @Column(name = "distribution_detail_sent")
    private BigDecimal distributionDetailSent;
    @Column(name = "distribution_detail_unsent")
    private BigDecimal distributionDetailUnsent;
    @Column(name = "distribution_detail_price")
    private BigDecimal distributionDetailPrice;
    @Lob
    @Column(name = "distribution_detail_description")
    private String distributionDetailDescription;
    @JoinColumn(name = "distribution_detail_distribution_id", referencedColumnName = "distribution_id")
    @ManyToOne
    private PosTransactionMkDistributionToOutlet distributionDetailDistributionId;
    @JoinColumn(name = "distribution_detail_item_id", referencedColumnName = "item_id")
    @ManyToOne
    private PosMasterItem distributionDetailItemId;
    @JoinColumn(name = "distribution_detail_price_mainkitchen_id", referencedColumnName = "price_id")
    @ManyToOne
    private PosMasterPriceMainkitchen distributionDetailPriceMainkitchenId;

    public PosTransactionMkDistributionToOutletDetail() {
    }

    public PosTransactionMkDistributionToOutletDetail(Integer distributionDetailId) {
        this.distributionDetailId = distributionDetailId;
    }

    public String getSync() {
        return sync;
    }

    public void setSync(String sync) {
        this.sync = sync;
    }

    public Integer getDistributionDetailId() {
        return distributionDetailId;
    }

    public void setDistributionDetailId(Integer distributionDetailId) {
        this.distributionDetailId = distributionDetailId;
    }

    public BigDecimal getDistributionDetailQuantity() {
        return distributionDetailQuantity;
    }

    public void setDistributionDetailQuantity(BigDecimal distributionDetailQuantity) {
        this.distributionDetailQuantity = distributionDetailQuantity;
    }

    public BigDecimal getDistributionDetailSent() {
        return distributionDetailSent;
    }

    public void setDistributionDetailSent(BigDecimal distributionDetailSent) {
        this.distributionDetailSent = distributionDetailSent;
    }

    public BigDecimal getDistributionDetailUnsent() {
        return distributionDetailUnsent;
    }

    public void setDistributionDetailUnsent(BigDecimal distributionDetailUnsent) {
        this.distributionDetailUnsent = distributionDetailUnsent;
    }

    public BigDecimal getDistributionDetailPrice() {
        return distributionDetailPrice;
    }

    public void setDistributionDetailPrice(BigDecimal distributionDetailPrice) {
        this.distributionDetailPrice = distributionDetailPrice;
    }

    public PosMasterItem getDistributionDetailItemId() {
        return distributionDetailItemId;
    }

    public void setDistributionDetailItemId(PosMasterItem distributionDetailItemId) {
        this.distributionDetailItemId = distributionDetailItemId;
    }

    public String getDistributionDetailDescription() {
        return distributionDetailDescription;
    }

    public void setDistributionDetailDescription(String distributionDetailDescription) {
        this.distributionDetailDescription = distributionDetailDescription;
    }

    public PosTransactionMkDistributionToOutlet getDistributionDetailDistributionId() {
        return distributionDetailDistributionId;
    }

    public void setDistributionDetailDistributionId(PosTransactionMkDistributionToOutlet distributionDetailDistributionId) {
        this.distributionDetailDistributionId = distributionDetailDistributionId;
    }

    public PosMasterPriceMainkitchen getDistributionDetailPriceMainkitchenId() {
        return distributionDetailPriceMainkitchenId;
    }

    public void setDistributionDetailPriceMainkitchenId(PosMasterPriceMainkitchen distributionDetailPriceMainkitchenId) {
        this.distributionDetailPriceMainkitchenId = distributionDetailPriceMainkitchenId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (distributionDetailId != null ? distributionDetailId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PosTransactionMkDistributionToOutletDetail)) {
            return false;
        }
        PosTransactionMkDistributionToOutletDetail other = (PosTransactionMkDistributionToOutletDetail) object;
        if ((this.distributionDetailId == null && other.distributionDetailId != null) || (this.distributionDetailId != null && !this.distributionDetailId.equals(other.distributionDetailId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ronsicecream.pos.entities.PosTransactionMkDistributionToOutletDetail[ distributionDetailId=" + distributionDetailId + " ]";
    }
    
}
